//
//  ImageAddition.h
//  EasyMI_iPhone
//
//  Created by chen wenhao on 13-1-10.
//
//

#import <Foundation/Foundation.h>

@interface ImageAddition : NSObject

typedef enum {
    PointDirectionLeft,
    PointDirectionRight,
} PointDirection;

+ (UIImage *)imageWithImage:(UIImage *)image scaledToSize:(CGSize)newSize;

+ (UIImage*)makeRoundCornerImage:(UIImage*)img rate:(float)rate;

+ (UIImage*)makeChatImage:(UIImage*)img rate:(float)rate direction:(PointDirection)direction;

+ (UIImage *)imageByScalingToMaxSize:(UIImage *)sourceImage originalMaxWidth:(float)originalMaxWidth;
+ (UIImage *)imageByScalingAndCroppingForSourceImage:(UIImage *)sourceImage targetSize:(CGSize)targetSize;

+ (NSString *)imageFormat:(NSData *)data;

+ (NSData *)thumbImage:(NSData *)data origin:(UIImage *)origin compressionQuality:(float)compressionQuality size:(float)size;
+ (NSString *)thumbPath:(NSString *)path;
+ (UIImage *)thumbImage:(NSString *)path;
+ (NSString *)originalPathAccordingToThumbPath:(NSString *)thumbPath; // 获取原图路径
@end
